#ifndef _STATE_H_
#define _STATE_H_

#include <string>
#include "SharedDef.h"

class State{
public:
    State(int stateId):m_stateId(stateId){}
    virtual std::string GetString(){
        return "";
    }
public:
    int m_stateId;
};

class UserState:public State{
public:
    UserState(int stateId):State(stateId){}
    virtual std::string GetString()
    {
        switch(m_stateId)
        {
            case Idle:
                return "空闲";
            case InGameHall:
                return "在游戏大厅";
            case InRoom201:
                return "在房间201";
            case InRoom202:
                return "在房间202";
        }

        return "无状态";
    }
};

class RoomState: public State{
public:
    RoomState(int stateId):State(stateId){}
    virtual std::string GetString()
    {
        switch(m_stateId)
        {
            case Empty:
                return "没有人";
            case HasUser:
                return "有人";
        }

        return "无状态";
    }
};

#endif